import cv2
import numpy as np

def load_image(path):
    return cv2.imdecode(np.fromfile(path, np.uint8), -1)

def load_gray(path):
    return cv2.cvtColor(load_image(path), cv2.COLOR_BGR2GRAY)